<%@page import="subject.Subject"%>
<%@page import="subject.SubjectDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>科目列表</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<div align="center"><a href="zuoye20180531/addSubject.jsp">新增课程</a></div>
	<%
		out.print("<div align='center'><table border='1px' cellspacing='0px' style='text-align:center;border-collapse:collapse'>");
	  out.print("<tr><th>编号</th><th>学科名称</th><th>学时</th><th>年级</th></tr>");
	%>
	<%
		SubjectDao sbDao=new SubjectDao();
	  		List<Subject> list=sbDao.sblist();
	  		for(Subject s:list)
	  		{
	out.print("<tr><td>"+s.getId()+"</td><td>"+s.getSubjectname()+"</td><td>"+s.getClasshour()+"</td><td>"+s.getGradeid()+"</td></tr>");
	  			
	  		}
	%>
	<%
		out.print("</table></div>");
	%>
</body>
</html>